import { FetchService } from '@/utils'
/**
 * RESTful风格接口
 * @class
 */
export default class {
	public http: FetchService
	public constructor(http: FetchService) {
		this.http = http
	}

	/**
	 * 手机号+验证码登录接口
	 * @method
	 * @name #CheckCodeSsoOpenApiPOST
	 * @param {} req - req
	 */
	public async CheckCodeSsoOpenApiPOST(params: {
		payload?: typing.userCenter.RequestBean
	}): Promise<typing.userCenter.PlainResult$string$> {
		let path = ''
		path = '/api/open/sso/check-code'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$string$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 登出
	 * @method
	 * @name #LogoutSsoOpenApiPOST
	 */
	public async LogoutSsoOpenApiPOST(params: {}): Promise<{}> {
		let path = ''
		path = '/api/open/sso/logout'
		let body: any
		const queryParameters: any = {}

		const result: {} = await this.http.request({
			method: 'POST',
			url: path,
			params: queryParameters,
			payload: body,
		})
		return result
	}
	/**
	 * 确认授权接口，返回授权码
	 * @method
	 * @name #ConfirmAuthSsoPrivateApiPOST
	 * @param {string} tenantId - 租户id
	 */
	public async ConfirmAuthSsoPrivateApiPOST(params: {
		query?: {
			tenantId?: string
		}
	}): Promise<typing.userCenter.PlainResult$string$> {
		let path = ''
		path = '/api/private/sso/confirm-auth'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['tenantId'] !== undefined) {
			queryParameters['tenant_id'] = params.query['tenantId']
		}

		const result: typing.userCenter.PlainResult$string$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取用户基础信息，不包含和租户的关系
	 * @method
	 * @name #BaseUserPrivateApiGET
	 */
	public async BaseUserPrivateApiGET(params: {}): Promise<typing.userCenter.PlainResult$UserBaseInfoVO$> {
		let path = ''
		path = '/api/private/user/base'
		let body: any
		const queryParameters: any = {}

		const result: typing.userCenter.PlainResult$UserBaseInfoVO$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取用户详细信息，包含租户关系
	 * @method
	 * @name #DetailUserPrivateApiGET
	 */
	public async DetailUserPrivateApiGET(params: {}): Promise<typing.userCenter.PlainResult$UserDetailVO$> {
		let path = ''
		path = '/api/private/user/detail'
		let body: any
		const queryParameters: any = {}

		const result: typing.userCenter.PlainResult$UserDetailVO$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 返回true=已绑定，false=未绑定
	 * @method
	 * @name #StatusPhoneUserPrivateApiGET
	 * @param {string} tenantId - 租户id
	 * @param {string} tenantUserId - 租户内部的用户id
	 */
	public async StatusPhoneUserPrivateApiGET(params: {
		query?: {
			tenantId?: string
			tenantUserId?: string
		}
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/private/user/phone/status'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['tenantId'] !== undefined) {
			queryParameters['tenant_id'] = params.query['tenantId']
		}

		if (
			params.query !== undefined &&
			params.query['tenantUserId'] !== undefined
		) {
			queryParameters['tenant_user_id'] = params.query['tenantUserId']
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 返回true=已设置，false=未设置
	 * @method
	 * @name #StatusPwdUserPrivateApiGET
	 */
	public async StatusPwdUserPrivateApiGET(params: {}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/private/user/pwd/status'
		let body: any
		const queryParameters: any = {}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 登录后修改密码，需要输入原密码
	 * @method
	 * @name #ResetPwdUserPrivateApiPUT
	 * @param {string} newPwd - 新密码
	 * @param {string} oldPwd - 原密码
	 */
	public async ResetPwdUserPrivateApiPUT(params: {
		query?: {
			newPwd?: string
			oldPwd?: string
		}
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/private/user/reset-pwd'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['newPwd'] !== undefined) {
			queryParameters['newPwd'] = params.query['newPwd']
		}

		if (params.query !== undefined && params.query['oldPwd'] !== undefined) {
			queryParameters['oldPwd'] = params.query['oldPwd']
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'PUT',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取租户绑定列表
	 * @method
	 * @name #ListTenantUserPrivateApiGET
	 */
	public async ListTenantUserPrivateApiGET(params: {}): Promise<typing.userCenter.PlainResult$List$UserTenantRelationVO$$> {
		let path = ''
		path = '/api/private/user/tenant/list'
		let body: any
		const queryParameters: any = {}

		const result: typing.userCenter.PlainResult$List$UserTenantRelationVO$$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * sso授权接口
	 * @method
	 * @name #AuthorizeSsoPublicApiPOST
	 * @param {string} redirectUri - redirectUri
	 * @param {string} state - state
	 */
	public async AuthorizeSsoPublicApiPOST(params: {
		query?: {
			redirectUri?: string
			state?: string
		}
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/sso/authorize'
		let body: any
		const queryParameters: any = {}

		if (
			params.query !== undefined &&
			params.query['redirectUri'] !== undefined
		) {
			queryParameters['redirectUri'] = params.query['redirectUri']
		}

		if (params.query !== undefined && params.query['state'] !== undefined) {
			queryParameters['state'] = params.query['state']
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取clientToken的接口
	 * @method
	 * @name #ClientTokenSsoPublicApiPOST
	 * @param {} clientTokenDto - clientTokenDto
	 */
	public async ClientTokenSsoPublicApiPOST(params: {
		payload?: typing.userCenter.ClientTokenDto
	}): Promise<typing.userCenter.PlainResult$string$> {
		let path = ''
		path = '/api/public/sso/client-token'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$string$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 手机号+密码登录接口
	 * @method
	 * @name #PwdLoginSsoPublicApiPOST
	 * @param {} loginDto - loginDto
	 */
	public async PwdLoginSsoPublicApiPOST(params: {
		payload?: typing.userCenter.LoginDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/sso/login/pwd'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 手机号+验证码登录接口
	 * @method
	 * @name #VerifyCodeLoginSsoPublicApiPOST
	 * @param {} loginDto - loginDto
	 */
	public async VerifyCodeLoginSsoPublicApiPOST(params: {
		payload?: typing.userCenter.LoginDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/sso/login/verify-code'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 忘记密码，使用手机号验证码重置密码
	 * @method
	 * @name #ForgetPwdUserPublicApiPUT
	 * @param {} forgetPwdDto - forgetPwdDto
	 */
	public async ForgetPwdUserPublicApiPUT(params: {
		payload?: typing.userCenter.ForgetPwdDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/user/forget-pwd'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'PUT',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 邀请接口，发送邀请短信
	 * @method
	 * @name #InviteUserPublicApiPOST
	 * @param {} invitationDto - invitationDto
	 */
	public async InviteUserPublicApiPOST(params: {
		payload?: typing.userCenter.InvitationDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/user/invite'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 邀请注册，需要传用户详细信息
	 * @method
	 * @name #InviteRegisterUserPublicApiPOST
	 * @param {} inviteRegisterDto - inviteRegisterDto
	 */
	public async InviteRegisterUserPublicApiPOST(params: {
		payload?: typing.userCenter.InviteRegisterDto
	}): Promise<typing.userCenter.PlainResult$UserTenantRelationVO$> {
		let path = ''
		path = '/api/public/user/invite-register'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$UserTenantRelationVO$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 验证邀请码，验证失败，跳转错误页面，成功则跳转到注册页面
	 * @method
	 * @name #VerifyInvitationCodeUserPublicApiGET
	 * @param {string} invitationCode - 邀请码
	 */
	public async VerifyInvitationCodeUserPublicApiGET(params: {
		query?: {
			invitationCode?: string
		}
	}): Promise<typing.userCenter.PlainResult$InvitationDto$> {
		let path = ''
		path = '/api/public/user/verify-invitation-code'
		let body: any
		const queryParameters: any = {}

		if (
			params.query !== undefined &&
			params.query['invitationCode'] !== undefined
		) {
			queryParameters['invitation_code'] = params.query['invitationCode']
		}

		const result: typing.userCenter.PlainResult$InvitationDto$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取人机验证码接口，type和requestId必传
	 * @method
	 * @name #MachineVerifyCodePublicApiGET
	 * @param {string} type - 验证码类型: SLIDE=滑动，OPERATION=运算，CHAR=字符验证码
	 * @param {string} uid - 请求唯一标识
	 */
	public async MachineVerifyCodePublicApiGET(params: {
		query?: {
			type?: string
			uid?: string
		}
	}): Promise<typing.userCenter.PlainResult$ImageVerificationVO$> {
		let path = ''
		path = '/api/public/verify-code/machine'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['type'] !== undefined) {
			queryParameters['type'] = params.query['type']
		}

		if (params.query !== undefined && params.query['uid'] !== undefined) {
			queryParameters['uid'] = params.query['uid']
		}

		const result: typing.userCenter.PlainResult$ImageVerificationVO$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 验证人机验证码接口，滑动验证码的x,y坐标值必传
	 * @method
	 * @name #MachineVerifyCodePublicApiPOST
	 * @param {string} uid - 获取验证码时的唯一id
	 * @param {string} x - x坐标
	 * @param {string} y - y坐标
	 */
	public async MachineVerifyCodePublicApiPOST(params: {
		query?: {
			uid?: string
			x?: string
			y?: string
		}
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/verify-code/machine'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['uid'] !== undefined) {
			queryParameters['uid'] = params.query['uid']
		}

		if (params.query !== undefined && params.query['x'] !== undefined) {
			queryParameters['x'] = params.query['x']
		}

		if (params.query !== undefined && params.query['y'] !== undefined) {
			queryParameters['y'] = params.query['y']
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取短信验证码
	 * @method
	 * @name #SmsVerifyCodePublicApiGET
	 * @param {string} bizType - 业务类型：LOGIN=登录时，REGISTER=注册时，RESET_PWD=重置密码时，BIND_PHONE=必定密码时，UPDATE_PHONE=换绑手机号时
	 * @param {string} phone - 手机号
	 */
	public async SmsVerifyCodePublicApiGET(params: {
		query?: {
			bizType?: string
			phone?: string
		}
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/verify-code/sms'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['bizType'] !== undefined) {
			queryParameters['biz_type'] = params.query['bizType']
		}

		if (params.query !== undefined && params.query['phone'] !== undefined) {
			queryParameters['phone'] = params.query['phone']
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'GET',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 验证短信验证码
	 * @method
	 * @name #SmsVerifyCodePublicApiPOST
	 * @param {string} bizType - 业务类型：LOGIN=登录时，REGISTER=注册时，RESET_PWD=重置密码时
	 * @param {string} code - 验证码
	 * @param {string} phone - 手机号
	 */
	public async SmsVerifyCodePublicApiPOST(params: {
		query?: {
			bizType?: string
			code?: string
			phone?: string
		}
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/verify-code/sms'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['bizType'] !== undefined) {
			queryParameters['biz_type'] = params.query['bizType']
		}

		if (params.query !== undefined && params.query['code'] !== undefined) {
			queryParameters['code'] = params.query['code']
		}

		if (params.query !== undefined && params.query['phone'] !== undefined) {
			queryParameters['phone'] = params.query['phone']
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取用户基础信息，不包含和租户的关系
	 * @method
	 * @name #BaseInfoUserOpenV1ApiPOST
	 * @param {string} tenantId - 租户id
	 * @param {string} tenantUserId - 租户内用户id
	 */
	public async BaseInfoUserOpenV1ApiPOST(params: {
		query?: {
			tenantId?: string
			tenantUserId?: string
		}
	}): Promise<typing.userCenter.PlainResult$UserBaseInfoVO$> {
		let path = ''
		path = '/api/v1/open/user/base-info'
		let body: any
		const queryParameters: any = {}

		if (params.query !== undefined && params.query['tenantId'] !== undefined) {
			queryParameters['tenant_id'] = params.query['tenantId']
		}

		if (
			params.query !== undefined &&
			params.query['tenantUserId'] !== undefined
		) {
			queryParameters['tenant_user_id'] = params.query['tenantUserId']
		}

		const result: typing.userCenter.PlainResult$UserBaseInfoVO$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 绑定手机号
	 * @method
	 * @name #BindPhoneUserOpenV1ApiPOST
	 * @param {} inviteRegisterDto - inviteRegisterDto
	 */
	public async BindPhoneUserOpenV1ApiPOST(params: {
		payload?: typing.userCenter.InviteRegisterDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/v1/open/user/bind-phone'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 修改密码
	 * @method
	 * @name #ResetPwdUserOpenV1ApiPOST
	 * @param {} pwdDto - pwdDto
	 */
	public async ResetPwdUserOpenV1ApiPOST(params: {
		payload?: typing.userCenter.PwdDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/v1/open/user/reset-pwd'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 设置密码
	 * @method
	 * @name #SetPwdUserOpenV1ApiPOST
	 * @param {} pwdDto - pwdDto
	 */
	public async SetPwdUserOpenV1ApiPOST(params: {
		payload?: typing.userCenter.PwdDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/v1/open/user/set-pwd'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 换绑手机号
	 * @method
	 * @name #UpdatePhoneUserOpenV1ApiPOST
	 * @param {} updatePhoneDto - updatePhoneDto
	 */
	public async UpdatePhoneUserOpenV1ApiPOST(params: {
		payload?: typing.userCenter.UpdatePhoneDto
	}): Promise<typing.userCenter.PlainResult$boolean$> {
		let path = ''
		path = '/api/v1/open/user/update-phone'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.userCenter.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * healthCheck
	 * @method
	 * @name #CheckHealthGET
	 */
	public async CheckHealthGET(params: {}): Promise<string> {
		let path = ''
		path = '/health/check'
		let body: any
		const queryParameters: any = {}

		const result: string = await this.http.request({
			method: 'GET',
			url: path,
			params: queryParameters,
			payload: body,
		})
		return result
	}
}
